package com.ruoyi.framework.config.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * slave 配置属性
 * 主要用于判断slave数据源是否启用，其实只用了enabled属性
 * @author ruoyi
 */
@Configuration
public class SlaveProperties
{
    @Value("${spring.datasource.druid.slave.enabled}")
    private Boolean enabled;

    @Value("${spring.datasource.druid.slave.url}")
    private String url;

    @Value("${spring.datasource.druid.slave.username}")
    private String username;

    @Value("${spring.datasource.druid.slave.password}")
    private String password;

    @Value("${spring.datasource.druid.slave.aopPackage}")
    private String aopPackage;

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAopPackage() {
        return aopPackage;
    }

    public void setAopPackage(String aopPackage) {
        this.aopPackage = aopPackage;
    }
}
